package com.kx.forum.client;

import com.kx.base.dto.file.ImgDTO;
import com.kx.base.result.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.multipart.MultipartFile;

/**
 * 调用文件服务器上传文件
 *
 * @author Sun
 * @date 2021/8/10 20:52
 */
@FeignClient(value = "file-service")
public interface FileClient {
    /**
     * 上传图片的接口
     */
    @PostMapping("kx/file/img")
    R uploadImage(@RequestBody ImgDTO imgDTO);

    /**
     * 上传是视频的接口
     */
    @PostMapping("kx/file/mp4")
    R uploadMP4(MultipartFile file);
}
